<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>input的值绑定</title>
</head>
<body>
<div id="app">
  <!--input的值绑定v-bind:value,这里:for和:id对应，其实要不要都一样-->
  <label v-for="item in originHobbies" :for="item">
    <input type="checkbox" :id="item" :value="item" v-model="hobbies">{{item}}
  </label>
  <h2>您选择的爱好是：{{hobbies}}</h2>

</div>
<script src="../js/vue.js"></script>
<script>
  const app = new Vue({
    el: '#app',
    data: {
      originHobbies: ['篮球', '足球', '羽毛球', '乒乓球', '网球', '排球', '高尔夫球', '台球', '冰球'],
      hobbies: []
    }
  });
</script>
</body>
</html>
